package com.csjbot.weedle_auto.fragment.bean

import com.csjbot.weedle_auto.util.TimeUtil

import java.io.Serializable

/**
 * author : chenqi.
 * e_mail : 1650699704@163.com.
 * create_time : 8/14/17.
 */

class StationBean : Serializable {

    var power = 0
    var connect = false
    var isCharge = false
    private var ISOK: String? = null

    var iso: String
        get() {
            if (ISOK == null) {
                ISOK = "slam没有连接"
            }
            return ISOK!!
        }
        set(s) {
            ISOK = s
        }

    override fun toString(): String {
        return "\r\n" + "---------slam---------" + "\r\n" +
                "电池电量：" + power + "\r\n" +
                "连接状况：" + connect + "\r\n" +
                "是否在充电：" + isCharge + "\r\n" +
                "测试状态：" + iso + "\r\n" +
                "备注：" + "slam的数据是根据是否连接上了和电量是不是为0来判断的！" +
                "如果不通过就会说明是哪里的问题！"
    }


    fun toString2(): String {
        return TimeUtil.currenTime + "\r\n" + "电池电量：" + power + "\r\n" +
                "连接状况：" + connect + "\r\n" +
                "是否在充电：" + isCharge + "\r\n" +
                "测试状态：" + iso + "\r\n"
    }

    companion object {
        private const val serialVersionUID = 1L//默认序列号
    }
}
